package cn.iocoder.yudao.hires.mapper;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.hires.entity.ResumeSkillDO;
import cn.iocoder.yudao.hires.vo.ResumeSkillPageReqVO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 简历-职业技能 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface ResumeSkillMapper extends BaseMapperX<ResumeSkillDO> {

    default PageResult<ResumeSkillDO> selectPage(ResumeSkillPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ResumeSkillDO>()
                .eqIfPresent(ResumeSkillDO::getUserId, reqVO.getUserId())
                .likeIfPresent(ResumeSkillDO::getSkillName, reqVO.getSkillName())
                .eqIfPresent(ResumeSkillDO::getSkillProficiency, reqVO.getSkillProficiency())
                .betweenIfPresent(ResumeSkillDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(ResumeSkillDO::getId));
    }

}